package com.calvin.spring2.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        // 创建Spring 的IOC容器
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        // 获取Bean 实例
        ACalculator calculator = context.getBean(ACalculator.class);

        // 使用Bean
        System.out.println(calculator.add(1,2));
    }
}
